<template>
  <div id="root">
    <button @click="getStudents">获取学生信息</button>
    <button @click="getStudents1">获取学生信息</button>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "App",
  methods: {
    getStudents() {
      axios.get("http://localhost:8080/mine/students").then(
        (response) => {
          console.log("successful", response.data);
        },
        (error) => {
          console.error(error);
        }
      );
    },
    getStudents() {
      axios.get("http://localhost:8080/yours/students").then(
        (response) => {
          console.log("successful", response.data);
        },
        (error) => {
          console.error(error);
        }
      );
    },
  },
};
</script>

<style>
</style>
